﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace vdos.jobseeker.CustomerView.Common
{
    public class AppEnv
    {
        private static AppEnv _instance;

        public const string VIETNAMESE = "vi-vn";
        public const string ENGLISH = "en-us";

        public static AppEnv Instance()
        {
            if (_instance == null)
            {
                _instance = new AppEnv();
            }
            return _instance;
        }

        public string Root
        {
            get
            {
                String strPath = System.Web.HttpContext.Current.Request.ApplicationPath;
                return strPath.EndsWith("/") ? strPath : strPath + "/";
            }
        }
        public string DomainName
        {
            get
            {

                String strPath = System.Web.HttpContext.Current.Request.ApplicationPath;

                return strPath.EndsWith("/") ? strPath : strPath + "/";

            }
        }
        public string this[string attribute]
        {
            get { return ConfigurationManager.AppSettings[attribute]; }
        }
    }
}